/*
 * @version: 
 * @Author: yu
 * @Date: 2023-07-03 17:23:17
 * @LastEditors: Andy
 * @LastEditTime: 2023-07-03 19:14:13
 */
import { seckList } from '@/request/api'

const state = {
    list: []
}

const mutations = {
    changeList(state, arr) {
        state.list = arr
    }
}


const actions = {
    listActions(context) {
        seckList().then(res => {
            // console.log(res);
            if (res.code === 200) {
                context.commit('changeList', res.list)
            }
        })
    }
}


//派生状态
const getters = {
    list(state) {
        return state.list
    }
}


export default {
    state,
    mutations,
    actions,
    getters,
    namespaced: true
}